<div class="panel panel-default panel-intro">{:build_heading()}
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div class="bootstrap-table">
                        <div class="fixed-table-toolbar">
                            <div class="bs-bars pull-left">
                                <div id="toolbar" class="toolbar" style="position: relative;">
                                    <a href="javascript:;" class="btn btn-primary btn-refresh" title="刷新">
                                        <i class="fa fa-refresh"></i>
                                    </a>
                                    <a href="{:url('Mukuai/gedit',['model_id'=>input('get.model_id')])}" class="btn btn-success btn-add" title="添加">
                                        <i class="fa fa-plus"></i>添加</a>
                                </div>
                            </div>
                            <div class="columns-right pull-right" style="margin-top:10px;margin-bottom:10px;">
                                <button class="btn btn-default" type="button" name="commonSearch" title="普通搜索">
                                    <i class="glyphicon glyphicon-search"></i>
                                </button>
                            </div>
                            <div class="pull-right search">
                                <select class="group form-control" style="min-width: 100px;">
                                    <option value="">请选择</option>
                                   <option value="">订单列表</option>
                  
                                </select>
                            </div>
                            <div class="pull-right search" style="line-height: 31px;margin-left: 15px;margin-right: 10px;">
                                功能:
                            </div>
                            <div class="pull-right search">
                                <select class="group form-control" style="min-width: 100px;">
                                    <option value="">请选择</option>
                                   <option value="">订单</option>
                                   <option value="">商品</option>
                                </select>
                            </div>      
                            <div class="pull-right search" style="line-height: 31px;margin-left: 15px;margin-right: 10px;">
                                模块:
                            </div>
                        </div>
                        <div class="fixed-table-container" style="padding-bottom: 0px;">
                            <div class="fixed-table-body">
                                <table id="table" class="table table-striped table-bordered table-hover" width="100%">
                                    <thead>
                                        <tr>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">ID</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">模块</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">功能名称</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">子功能名称</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                          <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">状态</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                            <th style="text-align: center; vertical-align: middle; ">
                                                <div class="th-inner ">操作</div>
                                                <div class="fht-cell"></div>
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody data-listidx="0">
                                       {volist name="list" id="vo"}      
                                        <tr data-index="{$key}">
                                            <td style="text-align: center; vertical-align: middle;">
                                               {$key+1}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                 {php}
                                                       $data=db('model_manage')->where('id', $vo['model_id'])->find();
                                                       echo $data['name'];
                                                    {/php}     
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                {$vo.name}
                                            </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                                {$vo.cname}
                                            </td>
                                           <td style="text-align: center; vertical-align: middle;">
                                             {empty name="vo.cname"}
                                               {switch name="vo.status" }
                                                 {case value="0"}停用{/case}
                                                  {case value="1"}启用{/case}
                                               {/switch}
                                              {else/}
                                                {switch name="vo.ch_status" }
                                                  {case value="0"}停用{/case}
                                                  {case value="1"}启用{/case}
                                                {/switch}
                                             {/empty}
                                           </td>
                                            <td style="text-align: center; vertical-align: middle;">
                                
                                             {empty name="vo.cname"}
                                               {switch name="vo.status" }
                                                 {case value="0"}
                                                    <a href="{:url('Mukuai/changeGongnenStatus',['id'=>$vo['id'],'status'=>1])}" class="btn btn-xs btn-danger">
                                                     启用
                                                   </a>
                                                 {/case}
                                                 {case value="1"}
                                                    <a href="{:url('Mukuai/changeGongnenStatus',['id'=>$vo['id'],'status'=>0])}" class="btn btn-xs btn-danger">
                                                     停用
                                                   </a>
                                                 {/case}
                                               {/switch}
                                            {else/}
                                                {switch name="vo.ch_status" }
                                                  {case value="0"}
                                                    <a href="{:url('Mukuai/changeChildGongnenStatus',['id'=>$vo['id'],'status'=>1])}" class="btn btn-xs btn-danger">
                                                     启用
                                                   </a>

                                                  {/case}
                                                  {case value="1"}
                                                     <a href="{:url('Mukuai/changeChildGongnenStatus',['id'=>$vo['id'],'status'=>0])}" class="btn btn-xs btn-danger">
                                                     停用
                                                    </a>
                                                  {/case}
                                                {/switch}
                                               {/empty}
                                                <a href="{:url('Mukuai/gedit',['id'=>$vo['id']])}" class="btn btn-xs btn-success">
                                                    修改
                                                </a>
                                                {if condition="!empty($vo['cid'])" }
                                                 <a href="{:url('Mukuai/gdelete',['id'=>$vo['cid']])}" class="btn btn-xs btn-danger">
                                                    删除
                                                 </a>
                                                {else/}
                                                 <a href="{:url('Mukuai/gongdelete',['id'=>$vo['id']])}" class="btn btn-xs btn-danger">
                                                    删除
                                                 </a>
                                                {/if}
                                                <a href="{:url('Mukuai/jishu',['gid'=>$vo['cid']])}" class="btn btn-xs btn-success">
                                                    技术选型
                                                </a>
                                                <a href="{:url('Ziyuan/zedit',['cid'=>$vo['cid']])}" class="btn btn-xs btn-success">
                                                    资源上传 
                                                </a>
                                              <a href="{:url('Ziyuan/zlist',['gongnen_id'=>$vo['id']])}" class="btn btn-xs btn-success">
                                                    资源查看 
                                                </a>
                                            </td>
                                        </tr>
                                        {/volist}        
                                    </tbody>
                                </table>
                            </div>
                            <div class="fixed-table-pagination" style="display: block;">
                               {$list->render()}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>